﻿<UserControl x:Class="EzDesk.DesktopClient.View.TopPanelView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"  MouseLeftButtonDown="UserControl_MouseLeftButtonDown">
    <Border CornerRadius="5,5,0,0">
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Offset="0" Color="#FFFAFAFA"></GradientStop>
                <GradientStop Offset="1" Color="#FFCBD2DB"></GradientStop>
            </LinearGradientBrush>
        </Border.Background>
        <Grid Margin="5,0,5,0">
            <TextBlock Text="{StaticResource ClientTitle}" VerticalAlignment="Center" FontWeight="Bold" Foreground="#FF14316B" ></TextBlock>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button x:Name="MinimizeBtn" Margin="1"  Style="{StaticResource SimpleFunctionButtonStyle}" Click="MinimizeBtn_Click">
                    <Path Stretch="Fill"  Margin="2" StrokeThickness="2" Data="M0,0 L1,0" Stroke="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}, Path=Foreground}" />
                </Button>
                <Button x:Name="CloseBtn" Margin="1" Style="{StaticResource SimpleFunctionButtonStyle}" Click="CloseBtn_Click">
                    <Grid>
                        <Path Stretch="Fill"  Margin="1" StrokeThickness="2" Data="M1,1 L0,0 " Stroke="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}, Path=Foreground}" />
                        <Path Stretch="Fill"  Margin="1" StrokeThickness="2" Data="M0,1 L1,0 " Stroke="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}, Path=Foreground}" />
                    </Grid>
                </Button>
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
